home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 41.zip
/
BS1 part 41
/
parallel-C disk .adf
/
trafo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-12-31
|
603b
|
28 lines
#include "linkio.c"
main()
{
FILE *fp;
char fname[30],buffer[1];
long i;
printf("Programm zum Empfangen von Daten ueber Linkanschluss\n");
init_root();
reset_root();
printf("Bitte den Filenamen angeben:\n");
scanf("%s",fname);
fp=fopen(fname,"w");
if (fp==NULL) {
printf("File kann nicht angelegt werden\n");
exit(-1);
}
printf("waiting for sender ...\n");
i=long_word_from_link();
printf("Filelaenge %ld\n",i);
while((i--)>0L) {
buffer[0]=byte_from_link();
fwrite(buffer,1,1,fp);
}
fclose(fp);
printf("Fertig!!\n");
}